package com.dianxin.smartpark.service.config;

import com.dianxin.acl.api.acl.AclDeptDicRpcService;
import com.dianxin.acl.api.acl.AclFileRpcService;
import com.dianxin.acl.api.acl.AclUserRpcService;
import com.dianxin.acl.api.aclApplInfo.AclAppInfoRpcService;
import com.dianxin.acl.api.dic.DataDicRpcService;
import com.dianxin.device.api.device.SmartDeviceUserRpcService;
import com.dianxin.device.api.device.SmartParkDeviceRpcService;
import com.dianxin.device.api.device.SmartParkDeviceSettingsRpcService;
import com.dianxin.device.api.device.SmartParkRelationDeviceRpcService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wangkai
 */
@Configuration
public class RpcServiceConfig {

    @DubboReference(version = "${dubbo.consumer.version}",group = "park-device" ,check = false)
    private SmartParkDeviceRpcService smartParkDeviceRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "park-device" ,check = false)
    private SmartParkDeviceSettingsRpcService smartParkDeviceSettingsRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "park-device" ,check = false)
    private SmartDeviceUserRpcService smartDeviceUserRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "park-device" ,check = false)
    private SmartParkRelationDeviceRpcService smartParkRelationDeviceRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "acl" ,check = false)
    private DataDicRpcService dataDicRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "acl" ,check = false)
    private AclUserRpcService aclUserRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "acl" ,check = false)
    private AclFileRpcService aclFileRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "acl" ,check = false)
    private AclDeptDicRpcService aclDeptDicRpcService;

    @DubboReference(version = "${dubbo.consumer.version}",group = "globalInfo" ,check = false)
    private AclAppInfoRpcService aclAppInfoRpcService;

    @Bean("aclAppInfoRpcService")
    public AclAppInfoRpcService getAclAppInfoRpcService(){
        return aclAppInfoRpcService;
    }

    @Bean("smartParkDeviceRpcService")
    public SmartParkDeviceRpcService getSmartParkDeviceRpcService() {
        return smartParkDeviceRpcService;
    }

    @Bean("smartParkDeviceSettingsRpcService")
    public SmartParkDeviceSettingsRpcService getSmartParkDeviceSettingsRpcService() {
        return smartParkDeviceSettingsRpcService;
    }

    @Bean("smartDeviceUserRpcService")
    public SmartDeviceUserRpcService getSmartParkDeviceUserRpcService() {
        return smartDeviceUserRpcService;
    }

    @Bean("dataDicRpcService")
    public DataDicRpcService getDataDicRpcService() {
        return dataDicRpcService;
    }

    @Bean("aclUserRpcService")
    public AclUserRpcService getAclUserRpcService() {
        return aclUserRpcService;
    }

    @Bean("smartParkRelationDeviceRpcService")
    public SmartParkRelationDeviceRpcService getSmartParkRelationDeviceRpcService() {
        return smartParkRelationDeviceRpcService;
    }

    @Bean("aclFileRpcService")
    public AclFileRpcService getAclFileRpcService() {
        return aclFileRpcService;
    }

    @Bean("aclDeptDicRpcService")
    public AclDeptDicRpcService getAclDeptDicRpcService() {
        return aclDeptDicRpcService;
    }
}
